home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
LEX_&_YA
/
CRSREF_P
/
CRSREF.C
Wrap
C/C++ Source or Header
|
1990-02-05
|
24KB
|
1,384 lines
# include <stdio.h>
# define U(x) x
# define BEGIN yybgin = yysvec + 1 +
# define INITIAL 0
# define YYLERR yysvec
# define YYSTATE (yyestate-yysvec-1)
# define YYOPTIM 1
# define YYLMAX 200
# define ECHO fprintf(yyout, "%s",yytext)
# define REJECT { nstr = yyreject(); goto yyfussy;}
struct yysvf {
struct yywork *yystoff;
struct yysvf *yyother;
int *yystops;};
extern struct yysvf *yyestate;
extern struct yysvf yysvec[], *yybgin;
/************************************************************************/
/* */
/* Source - CrsRef.lc */
/* Author - Alexander S. Colwell, Copyright (C) 1989 */
/* and */
/* LEX - Lexical Analysis Generator by M. E. Lesk */
/* Computing Science Technical Report # 39 by */
/* AT & T Bell Laboratories */
/* and */
/* Computer Language, February 1987 */
/* Learning about LEX by David L. Fox */
/* */
/* Purpose - This is a simple C Cross Reference to learn how the */
/* LEX really works! */
/* */
/************************************************************************/
#include <stdio.h> /* Standard I/O defs */
#include <stdlib.h> /* Standard Library defs */
#include <ctype.h> /* C Type definitions */
#include <string.h> /* String definitions */
struct tree { /* Binary tree structure */
struct tree *left,*right; /* Link tree pointers */
char *symbol; /* Identifier */
char *refs; /* ASCII string containing list */
/* of line numbers referencing */
/* this identifier */
} *tree = NULL;
# define YYNEWLINE 13
extern int yyleng;
extern char yytext[];
extern int yymorfg;
extern int yyfirsttime;
extern char *yysptr, yysbuf[];
extern int yytchar;
extern FILE *yyin, *yyout;
extern int yylineno;
yylex(){
int nstr; extern int yyprevious;
if(yyfirsttime){yyin=stdin;yyout=stdout;yyfirsttime=0;}
while((nstr = yylook()) >= 0)
{yyfussy: switch(nstr){
case 0:
if(yywrap()) return(0); break;
case 1:
;
break;
case 2:
;
break;
case 3:
;
break;
case 4:
;
break;
case 5:
;
break;
case 6:
;
break;
case 7:
;
break;
case 8:
;
break;
case 9:
;
break;
case 10:
;
break;
case 11:
;
break;
case 12:
;
break;
case 13:
;
break;
case 14:
;
break;
case 15:
;
break;
case 16:
;
break;
case 17:
;
break;
case 18:
;
break;
case 19:
;
break;
case 20:
;
break;
case 21:
;
break;
case 22:
;
break;
case 23:
;
break;
case 24:
;
break;
case 25:
;
break;
case 26:
;
break;
case 27:
;
break;
case 28:
;
break;
case 29:
;
break;
case 30:
;
break;
case 31:
;
break;
case 32:
;
break;
case 33:
;
break;
case 34:
;
break;
case 35:
;
break;
case 36:
;
break;
case 37:
btsave(yytext,&tree);
break;
case 38:
;
break;
case 39:
;
break;
case -1:
break;
default:
fprintf(yyout,"bad switch yylook %d\n",nstr);
}} return(0); }
/* end of yylex */
char *fileName; /* Input file name */
/* Define UNIX functions */
#define malloc(s) (char *)(MyNewPtr((long)(s)))
#define free(p) DisposPtr((Ptr)(p))
char *MyNewPtr(); /* Define forward references */
void main()
{
Str255 filename; /* Working file name */
fileName = &fileName[0]; /* Set global file name pointer */
printf("Enter file name:"); /* Enter file name */
gets(fileName); /* Get 1st file name */
while(TRUE) { /* Process this file */
if (strlen(fileName)) { /* Check if got non-null string */
yyfirsttime = FALSE; /* Setup I/O's */
yyin = fopen(fileName,"r");
yyout = stdout;
yylineno = 1; /* Reset it to first line # */
yylex(); /* OK, let's LEX it */
fclose(yyin); /* Close input file */
yyin = NULL;
}
printf("Enter file name:"); /* Enter next file name */
gets(fileName); /* Get nth file name */
}
}
/* This routine will wrap-up the LEX processing */
yywrap()
{
/* Output the symbols */
printf("C Cross Reference Listing Symbol : %s\nsymbol\tline number\n\n",
fileName);
btprint(tree);
btfree(tree);
tree = NULL;
return(1);
}
/* Routines to save and retrieve names in a binary tree, modelled after */
/* binary tree routines in Kernighan & Ritchie. */
/* This routine prints out the tree recursively */
btprint(t)
struct tree *t; /* Subtree pointer */
{
short i,j,k; /* Working indexes */
char str[9]; /* Working string */
short len; /* Working symbol length */
if (t) { /* Check if not end-of-subtree */
btprint(t->left); /* Print left subtree */
len = strlen(t->symbol);
strncpy(str,t->symbol,len = (len < 8 ? len:8));
str[len] = 0;
printf("%8s",str);
str[5] = 0;
for(i = k = 0, j = strlen(t->refs) / 5; i < j; i++) {
strncpy(str,t->refs + k,5); k += 5;
printf("%s",str);
if (!(i % 10))
if (i && i + 1 != j)
printf("\n ");
}
printf("\n");
btprint(t->right); /* Print right subtree */
}
}
/* This routine will release the tree's nodes */
btfree(t)
struct tree *t; /* Subtree pointer */
{
if (t) { /* Check if not end-of-subtree */
btfree(t->left); /* Release left subtree */
btfree(t->right); /* Release right subtree */
free(t->symbol); /* Release the symbol pointer */
free(t->refs); /* Release the references */
free(t); /* OK, release this node */
}
}
/* This routine recursively finds the place in the tree to install the */
/* string c. */
btsave(c,tree)
char *c; /* Identifier string pointer */
struct tree **tree; /* Subtree pointer */
{
char *p; /* Working string pointer */
short e; /* Working string comparsion */
if (!*tree) { /* Check if not end-of-subtree */
/* Add new entry */
*tree = (struct tree*)(malloc(sizeof(struct tree)));
(*tree)->left = (*tree)->right = NULL;
(*tree)->symbol = strcpy(malloc(strlen(c) + 1),c);
sprintf(((*tree)->refs = malloc(6)), "%5d",yylineno);
}
/* Check if found match */
else if (!(e = strcmp(c,(*tree)->symbol))) {
sprintf((p = malloc(strlen((*tree)->refs) + 6)),
"%s%5d",(*tree)->refs,yylineno);
free((*tree)->refs);
(*tree)->refs = p;
}
else if (e < 0) /* Check if belongs to left subtree*/
btsave(c,&(*tree)->left); /* Insert it in left subtree */
else /* Check if belongs to right subtree*/
btsave(c,&(*tree)->right); /* Insert it in right subtree */
}
/* This routine will allocate new data block and check if really got it!*/
char *MyNewPtr(s)
long s; /* Size of the data block */
{
char *p; /* Working data block pointer */
if (!(p = (char *)(NewPtr(s)))) {/* Check if fail to get it */
btfree(tree); /* Release the trees */
tree = NULL;
printf("...Opps, out of memory\n");/* Inform user about it */
exit(0); /* Oops, got a problem!!! */
}
return(p); /* Return data block pointer */
}
int yyvstop[] ={
0,
38,
0,
39,
0,
38,
0,
38,
0,
38,
0,
38,
0,
38,
0,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
37,
38,
0,
2,
0,
34,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
16,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
4,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
2,
0,
30,
0,
30,
0,
35,
0,
33,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
14,
37,
0,
37,
0,
3,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
31,
0,
31,
32,
0,
36,
0,
1,
0,
26,
37,
0,
37,
0,
6,
37,
0,
5,
37,
0,
37,
0,
37,
0,
37,
0,
13,
37,
0,
37,
0,
37,
0,
24,
37,
0,
25,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
35,
36,
0,
22,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
17,
37,
0,
37,
0,
37,
0,
11,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
37,
0,
20,
37,
0,
37,
0,
15,
37,
0,
37,
0,
37,
0,
18,
37,
0,
19,
37,
0,
37,
0,
23,
37,
0,
12,
37,
0,
10,
37,
0,
8,
37,
0,
9,
37,
0,
37,
0,
37,
0,
32,
0,
37,
0,
21,
37,
0,
37,
0,
29,
37,
0,
37,
0,
7,
37,
0,
28,
37,
0,
27,
37,
0,
32,
0,
0};
# define YYTYPE int
struct yywork { YYTYPE verify, advance; } yycrank[] ={
0,0, 0,0, 1,3, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 1,4, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 1,5,
0,0, 0,0, 0,0, 0,0,
1,6, 0,0, 0,0, 1,3,
1,3, 0,0, 0,0, 1,7,
1,8, 1,9, 1,10, 1,10,
1,10, 1,10, 1,10, 1,10,
1,10, 1,10, 1,10, 8,32,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 1,11, 0,0,
2,6, 29,63, 1,11, 0,0,
1,11, 0,0, 0,0, 2,7,
26,0, 1,11, 2,10, 2,10,
2,10, 2,10, 2,10, 2,10,
2,10, 2,10, 2,10, 28,0,
0,0, 1,11, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
1,11, 0,0, 1,12, 1,13,
1,14, 1,15, 1,16, 1,17,
1,18, 14,41, 1,19, 0,0,
28,62, 1,20, 0,0, 64,98,
14,42, 15,44, 66,99, 1,21,
1,22, 1,23, 1,24, 14,43,
1,25, 5,26, 13,40, 15,45,
16,46, 12,39, 2,12, 2,13,
2,14, 2,15, 2,16, 2,17,
2,18, 5,0, 2,19, 17,48,
16,47, 2,20, 17,49, 18,50,
20,53, 6,29, 19,51, 2,21,
2,22, 2,23, 2,24, 21,54,
2,25, 23,59, 19,52, 24,60,
25,61, 6,0, 5,27, 26,28,
39,73, 22,55, 22,56, 40,74,
31,67, 41,75, 5,26, 5,26,
42,76, 43,77, 28,28, 5,26,
5,26, 22,57, 44,78, 45,79,
22,58, 46,80, 6,29, 47,81,
48,82, 49,83, 50,84, 52,85,
53,86, 54,87, 6,29, 6,29,
55,89, 5,26, 56,90, 6,29,
6,29, 5,26, 57,91, 5,26,
31,67, 58,93, 54,88, 59,94,
5,26, 61,97, 62,0, 68,0,
60,95, 73,104, 74,105, 75,106,
76,107, 6,29, 77,108, 57,92,
5,26, 6,29, 60,96, 6,29,
5,28, 78,109, 69,103, 5,26,
6,29, 7,31, 7,31, 7,31,
7,31, 7,31, 7,31, 7,31,
7,31, 7,31, 7,31, 79,110,
6,29, 80,111, 81,112, 82,113,
6,30, 68,102, 9,33, 6,29,
9,34, 9,34, 9,34, 9,34,
9,34, 9,34, 9,34, 9,34,
9,34, 9,34, 69,103, 70,71,
70,71, 70,71, 70,71, 70,71,
70,71, 70,71, 70,71, 70,71,
70,71, 9,35, 84,114, 86,115,
87,116, 88,117, 89,118, 10,33,
9,36, 10,34, 10,34, 10,34,
10,34, 10,34, 10,34, 10,34,
10,34, 10,34, 10,34, 90,119,
9,37, 62,28, 91,120, 92,121,
93,122, 94,123, 95,124, 96,125,
97,126, 99,127, 10,35, 105,130,
108,131, 9,35, 109,132, 110,133,
35,70, 10,36, 35,70, 112,134,
9,36, 35,71, 35,71, 35,71,
35,71, 35,71, 35,71, 35,71,
35,71, 35,71, 35,71, 113,135,
9,37, 116,136, 117,137, 118,138,
119,139, 120,140, 121,141, 122,142,
123,143, 124,144, 10,35, 125,145,
126,146, 131,148, 132,149, 133,150,
134,151, 10,36, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
136,152, 137,153, 139,154, 140,155,
141,156, 142,157, 143,158, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 145,159, 147,160, 148,161,
149,162, 152,163, 158,164, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 11,38, 11,38, 11,38,
11,38, 30,64, 159,165, 160,166,
32,32, 161,167, 163,168, 165,169,
170,171, 0,0, 0,0, 0,0,
0,0, 30,0, 0,0, 0,0,
32,0, 33,69, 33,69, 33,69,
33,69, 33,69, 33,69, 33,69,
33,69, 33,69, 33,69, 0,0,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 30,64, 0,0,
0,0, 32,32, 33,35, 30,65,
0,0, 0,0, 30,64, 30,64,
0,0, 32,68, 32,32, 30,64,
30,66, 0,0, 32,32, 32,32,
100,101, 100,101, 100,101, 100,101,
100,101, 100,101, 100,101, 100,101,
100,101, 100,101, 0,0, 0,0,
0,0, 30,64, 0,0, 0,0,
32,32, 30,64, 33,35, 30,64,
32,32, 0,0, 32,32, 0,0,
30,64, 0,0, 0,0, 32,32,
0,0, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
30,64, 0,0, 0,0, 32,32,
0,0, 0,0, 0,0, 30,64,
0,0, 0,0, 32,32, 37,72,
37,72, 37,72, 37,72, 37,72,
37,72, 37,72, 37,72, 37,72,
37,72, 0,0, 0,0, 0,0,
0,0, 0,0, 0,0, 0,0,
37,72, 37,72, 37,72, 37,72,
37,72, 37,72, 67,100, 0,0,
67,100, 0,0, 0,0, 67,101,
67,101, 67,101, 67,101, 67,101,
67,101, 67,101, 67,101, 67,101,
67,101, 127,147, 127,147, 127,147,
127,147, 127,147, 127,147, 127,147,
127,147, 127,147, 127,147, 0,0,
37,72, 37,72, 37,72, 37,72,
37,72, 37,72, 103,128, 0,0,
103,128, 0,0, 0,0, 103,129,
103,129, 103,129, 103,129, 103,129,
103,129, 103,129, 103,129, 103,129,
103,129, 128,129, 128,129, 128,129,
128,129, 128,129, 128,129, 128,129,
128,129, 128,129, 128,129, 166,170,
166,170, 166,170, 166,170, 166,170,
166,170, 166,170, 166,170, 166,170,
166,170, 0,0, 0,0, 0,0,
0,0};
struct yysvf yysvec[] ={
0, 0, 0,
yycrank+-1, 0, 0,
yycrank+-29, yysvec+1, 0,
yycrank+0, 0, yyvstop+1,
yycrank+0, 0, yyvstop+3,
yycrank+-120, 0, yyvstop+5,
yycrank+-140, 0, yyvstop+7,
yycrank+169, 0, yyvstop+9,
yycrank+17, 0, yyvstop+11,
yycrank+188, 0, yyvstop+13,
yycrank+217, 0, yyvstop+15,
yycrank+278, 0, yyvstop+17,
yycrank+8, yysvec+11, yyvstop+20,
yycrank+8, yysvec+11, yyvstop+23,
yycrank+8, yysvec+11, yyvstop+26,
yycrank+12, yysvec+11, yyvstop+29,
yycrank+16, yysvec+11, yyvstop+32,
yycrank+27, yysvec+11, yyvstop+35,
yycrank+28, yysvec+11, yyvstop+38,
yycrank+40, yysvec+11, yyvstop+41,
yycrank+29, yysvec+11, yyvstop+44,
yycrank+46, yysvec+11, yyvstop+47,
yycrank+53, yysvec+11, yyvstop+50,
yycrank+28, yysvec+11, yyvstop+53,
yycrank+41, yysvec+11, yyvstop+56,
yycrank+48, yysvec+11, yyvstop+59,
yycrank+-63, yysvec+5, 0,
yycrank+0, 0, yyvstop+62,
yycrank+-74, yysvec+5, 0,
yycrank+30, 0, 0,
yycrank+-400, 0, 0,
yycrank+91, yysvec+7, 0,
yycrank+-403, 0, 0,
yycrank+369, 0, 0,
yycrank+0, yysvec+10, 0,
yycrank+249, 0, 0,
yycrank+0, 0, yyvstop+64,
yycrank+451, 0, 0,
yycrank+0, yysvec+11, yyvstop+66,
yycrank+40, yysvec+11, yyvstop+68,
yycrank+58, yysvec+11, yyvstop+70,
yycrank+46, yysvec+11, yyvstop+72,
yycrank+67, yysvec+11, yyvstop+74,
yycrank+55, yysvec+11, yyvstop+76,
yycrank+68, yysvec+11, yyvstop+78,
yycrank+54, yysvec+11, yyvstop+80,
yycrank+58, yysvec+11, yyvstop+83,
yycrank+59, yysvec+11, yyvstop+85,
yycrank+65, yysvec+11, yyvstop+87,
yycrank+63, yysvec+11, yyvstop+89,
yycrank+62, yysvec+11, yyvstop+91,
yycrank+0, yysvec+11, yyvstop+93,
yycrank+63, yysvec+11, yyvstop+96,
yycrank+70, yysvec+11, yyvstop+98,
yycrank+78, yysvec+11, yyvstop+100,
yycrank+73, yysvec+11, yyvstop+102,
yycrank+64, yysvec+11, yyvstop+104,
yycrank+93, yysvec+11, yyvstop+106,
yycrank+88, yysvec+11, yyvstop+108,
yycrank+83, yysvec+11, yyvstop+110,
yycrank+95, yysvec+11, yyvstop+112,
yycrank+92, yysvec+11, yyvstop+114,
yycrank+-185, yysvec+5, yyvstop+116,
yycrank+0, 0, yyvstop+118,
yycrank+72, 0, 0,
yycrank+0, yysvec+64, yyvstop+120,
yycrank+75, 0, 0,
yycrank+479, 0, 0,
yycrank+-186, yysvec+32, 0,
yycrank+145, yysvec+33, 0,
yycrank+199, 0, 0,
yycrank+0, yysvec+70, yyvstop+122,
yycrank+0, yysvec+37, yyvstop+124,
yycrank+90, yysvec+11, yyvstop+126,
yycrank+105, yysvec+11, yyvstop+128,
yycrank+102, yysvec+11, yyvstop+130,
yycrank+90, yysvec+11, yyvstop+132,
yycrank+90, yysvec+11, yyvstop+134,
yycrank+116, yysvec+11, yyvstop+136,
yycrank+129, yysvec+11, yyvstop+138,
yycrank+128, yysvec+11, yyvstop+140,
yycrank+129, yysvec+11, yyvstop+142,
yycrank+134, yysvec+11, yyvstop+144,
yycrank+0, yysvec+11, yyvstop+146,
yycrank+147, yysvec+11, yyvstop+149,
yycrank+0, yysvec+11, yyvstop+151,
yycrank+156, yysvec+11, yyvstop+154,
yycrank+155, yysvec+11, yyvstop+156,
yycrank+144, yysvec+11, yyvstop+158,
yycrank+148, yysvec+11, yyvstop+160,
yycrank+174, yysvec+11, yyvstop+162,
yycrank+162, yysvec+11, yyvstop+164,
yycrank+162, yysvec+11, yyvstop+166,
yycrank+164, yysvec+11, yyvstop+168,
yycrank+180, yysvec+11, yyvstop+170,
yycrank+171, yysvec+11, yyvstop+172,
yycrank+178, yysvec+11, yyvstop+174,
yycrank+176, yysvec+11, yyvstop+176,
yycrank+0, 0, yyvstop+178,
yycrank+193, 0, yyvstop+180,
yycrank+404, 0, 0,
yycrank+0, yysvec+100, yyvstop+183,
yycrank+0, 0, yyvstop+185,
yycrank+511, 0, 0,
yycrank+0, yysvec+11, yyvstop+187,
yycrank+180, yysvec+11, yyvstop+190,
yycrank+0, yysvec+11, yyvstop+192,
yycrank+0, yysvec+11, yyvstop+195,
yycrank+183, yysvec+11, yyvstop+198,
yycrank+173, yysvec+11, yyvstop+200,
yycrank+183, yysvec+11, yyvstop+202,
yycrank+0, yysvec+11, yyvstop+204,
yycrank+181, yysvec+11, yyvstop+207,
yycrank+191, yysvec+11, yyvstop+209,
yycrank+0, yysvec+11, yyvstop+211,
yycrank+0, yysvec+11, yyvstop+214,
yycrank+194, yysvec+11, yyvstop+217,
yycrank+196, yysvec+11, yyvstop+219,
yycrank+195, yysvec+11, yyvstop+221,
yycrank+201, yysvec+11, yyvstop+223,
yycrank+208, yysvec+11, yyvstop+225,
yycrank+215, yysvec+11, yyvstop+227,
yycrank+216, yysvec+11, yyvstop+229,
yycrank+216, yysvec+11, yyvstop+231,
yycrank+207, yysvec+11, yyvstop+233,
yycrank+216, yysvec+11, yyvstop+235,
yycrank+219, yysvec+11, yyvstop+237,
yycrank+489, 0, 0,
yycrank+521, 0, 0,
yycrank+0, yysvec+128, yyvstop+239,
yycrank+0, yysvec+11, yyvstop+242,
yycrank+211, yysvec+11, yyvstop+245,
yycrank+214, yysvec+11, yyvstop+247,
yycrank+222, yysvec+11, yyvstop+249,
yycrank+214, yysvec+11, yyvstop+251,
yycrank+0, yysvec+11, yyvstop+253,
yycrank+220, yysvec+11, yyvstop+256,
yycrank+227, yysvec+11, yyvstop+258,
yycrank+0, yysvec+11, yyvstop+260,
yycrank+236, yysvec+11, yyvstop+263,
yycrank+240, yysvec+11, yyvstop+265,
yycrank+224, yysvec+11, yyvstop+267,
yycrank+237, yysvec+11, yyvstop+269,
yycrank+241, yysvec+11, yyvstop+271,
yycrank+0, yysvec+11, yyvstop+273,
yycrank+259, yysvec+11, yyvstop+276,
yycrank+0, yysvec+11, yyvstop+278,
yycrank+331, 0, 0,
yycrank+254, yysvec+11, yyvstop+281,
yycrank+256, yysvec+11, yyvstop+283,
yycrank+0, yysvec+11, yyvstop+285,
yycrank+0, yysvec+11, yyvstop+288,
yycrank+272, yysvec+11, yyvstop+291,
yycrank+0, yysvec+11, yyvstop+293,
yycrank+0, yysvec+11, yyvstop+296,
yycrank+0, yysvec+11, yyvstop+299,
yycrank+0, yysvec+11, yyvstop+302,
yycrank+0, yysvec+11, yyvstop+305,
yycrank+272, yysvec+11, yyvstop+308,
yycrank+301, yysvec+11, yyvstop+310,
yycrank+311, 0, yyvstop+312,
yycrank+304, yysvec+11, yyvstop+314,
yycrank+0, yysvec+11, yyvstop+316,
yycrank+292, yysvec+11, yyvstop+319,
yycrank+0, yysvec+11, yyvstop+321,
yycrank+307, yysvec+11, yyvstop+324,
yycrank+531, 0, 0,
yycrank+0, yysvec+11, yyvstop+326,
yycrank+0, yysvec+11, yyvstop+329,
yycrank+0, yysvec+11, yyvstop+332,
yycrank+369, 0, 0,
yycrank+0, 0, yyvstop+335,
0, 0, 0};
struct yywork *yytop = yycrank+588;
struct yysvf *yybgin = yysvec+1;
char yymatch[] ={
00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
01 ,01 ,01 ,01 ,01 ,015 ,01 ,01 ,
01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
01 ,01 ,'"' ,01 ,01 ,01 ,01 ,01 ,
01 ,01 ,'*' ,'+' ,01 ,'+' ,01 ,'/' ,
'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,
'0' ,'0' ,01 ,01 ,01 ,01 ,01 ,01 ,
01 ,'A' ,'A' ,'A' ,'A' ,'E' ,'A' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'L' ,'G' ,'G' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'X' ,'G' ,'G' ,01 ,01 ,01 ,01 ,'_' ,
01 ,'A' ,'A' ,'A' ,'A' ,'E' ,'A' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'L' ,'G' ,'G' ,'G' ,
'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,'G' ,
'X' ,'G' ,'G' ,01 ,01 ,01 ,01 ,01 ,
0};
char yyextra[] ={
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0};
#define YYU(x) x
#define NLSTATE yyprevious=YYNEWLINE
int yytchar;
int yyleng;
char yytext[YYLMAX];
char yysbuf[YYLMAX];
char *yysptr = yysbuf;
int yylineno = 1;
int *yyfnd;
int yyprevious = YYNEWLINE;
int yymorfg;
int yyfirsttime = 1;
FILE *yyin, *yyout;
struct yysvf *yyestate, *yylstate [YYLMAX], **yylsp, **yyolsp;
# ifdef LEXDEBUG
int lexdebug = 0;
# endif
#ifndef output
int output(c) char c;
{ return(putc(c,yyout)); }
#endif
#ifndef input
int input()
{
if (yysptr>yysbuf) yytchar=U(*--yysptr);
else yytchar=getc(yyin);
if (yytchar=='\n') yylineno++;
if (yytchar==EOF) yytchar=0;
return(yytchar);
}
#endif
#ifndef unput
int unput(c) char c;
{ yytchar= (c); if(yytchar=='\n') yylineno--; *yysptr++=yytchar; }
#endif
int yymore()
{
return(yymorfg=1);
}
yylook(){
register struct yysvf *yystate, **lsp;
register struct yywork *yyt;
struct yysvf *yyz;
int yych;
struct yywork *yyr;
char *yylastch;
/* start off machines */
if (!yymorfg)
yylastch = yytext;
else {
yymorfg=0;
yylastch = yytext+yyleng;
}
for(;;){
lsp = yylstate;
yyestate = yystate = yybgin;
if (yyprevious==YYNEWLINE) yystate++;
for (;;){
# ifdef LEXDEBUG
if(lexdebug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
# endif
yyt = yystate->yystoff;
if(yyt == yycrank){ /* may not be any transitions */
yyz = yystate->yyother;
if(yyz == 0)break;
if(yyz->yystoff == yycrank)break;
}
*yylastch++ = yych = input();
tryagain:
# ifdef LEXDEBUG
if(lexdebug){
fprintf(yyout,"char ");
allprint(yych);
putchar('\n');
}
# endif
yyr = yyt;
if ( (int)yyt > (int)yycrank){
yyt = yyr + yych;
if (yyt <= yytop && yyt->verify+yysvec == yystate){
if(yyt->advance+yysvec == YYLERR) /* error transitions */
{unput(*--yylastch);break;}
*lsp++ = yystate = yyt->advance+yysvec;
goto contin;
}
}
# ifdef YYOPTIM
else if((int)yyt < (int)yycrank) { /* r < yycrank */
yyt = yyr = yycrank+(yycrank-yyt);
# ifdef LEXDEBUG
if(lexdebug)fprintf(yyout,"compressed state\n");
# endif
yyt = yyt + yych;
if(yyt <= yytop && yyt->verify+yysvec == yystate){
if(yyt->advance+yysvec == YYLERR) /* error transitions */
{unput(*--yylastch);break;}
*lsp++ = yystate = yyt->advance+yysvec;
goto contin;
}
yyt = yyr + YYU(yymatch[yych]);
# ifdef LEXDEBUG
if(lexdebug){
fprintf(yyout,"try fall back character ");
allprint(YYU(yymatch[yych]));
putchar('\n');
}
# endif
if(yyt <= yytop && yyt->verify+yysvec == yystate){
if(yyt->advance+yysvec == YYLERR) /* error transition */
{unput(*--yylastch);break;}
*lsp++ = yystate = yyt->advance+yysvec;
goto contin;
}
}
if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
# ifdef LEXDEBUG
if(lexdebug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
# endif
goto tryagain;
}
# endif
else
{unput(*--yylastch);break;}
contin:
# ifdef LEXDEBUG
if(lexdebug){
fprintf(yyout,"state %d char ",yystate-yysvec-1);
allprint(yych);
putchar('\n');
}
# endif
;
}
# ifdef LEXDEBUG
if(lexdebug){
fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
allprint(yych);
putchar('\n');
}
# endif
while (lsp-- > yylstate){
*yylastch-- = 0;
if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
yyolsp = lsp;
if(yyextra[*yyfnd]){ /* must backup */
while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
lsp--;
unput(*yylastch--);
}
}
yyprevious = YYU(*yylastch);
yylsp = lsp;
yyleng = yylastch-yytext+1;
yytext[yyleng] = 0;
# ifdef LEXDEBUG
if(lexdebug){
fprintf(yyout,"\nmatch ");
sprint(yytext);
fprintf(yyout," action %d\n",*yyfnd);
}
# endif
return(*yyfnd++);
}
unput(*yylastch);
}
if (yytext[0] == 0 /* && feof(yyin) */)
{
yysptr=yysbuf;
return(0);
}
yyprevious = yytext[0] = input();
if (yyprevious>0)
output(yyprevious);
yylastch=yytext;
# ifdef LEXDEBUG
if(lexdebug)putchar('\n');
# endif
}
}
yyback(p, m)
int *p;
{
if (p==0) return(0);
while (*p)
{
if (*p++ == m)
return(1);
}
return(0);
}